package com.matheushenrique.palladium
{

import com.matheushenrique.palladium.core.*;

import flash.text.TextField;
import flash.text.TextFieldAutoSize;

/**
 * Palladium (Pd) AS3 Framework (http://pd.matheushenrique.com)
 * 
 * PdTextField is an extremely fast, lightweight, and flexible. 
 * <b>Copyright 2010, Matheus Henrique. All rights reserved.</b>
 * 
 * @author Matheus Henrique dos Santos, contact@matheushenrique.com
 */

public class PdTextField extends TextField
{
    
    private var _textFieldEl:TextField;
    private var _textCallback:Function;
    
   /**
    * Constructor
    * @param extra_params
    */
    public function PdTextField(extra_params:Object = null):void
    {
        super();
        var params:Object = {
            // TextField params
            selectable: false,
            autoSize: TextFieldAutoSize.LEFT,
            
            // TextFormat params            
            font: "Tahoma", 
            size: 12, 
            color: 0
        };
        
        if (extra_params) Pd.extendKeys(params, extra_params);
        
        if (!Pd.hasKey(params, 'defaultTextFormat')) {
            var textFieldFt:flash.text.TextFormat = new flash.text.TextFormat();
            Pd.extendProps(textFieldFt, params);
            this.defaultTextFormat = textFieldFt
        }
        
        Pd.extendProps(this, params);

        return;
    }
    
}

}